package org.iks.push.business.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.iks.common.AjaxResult;
import org.iks.common.pojo.message.ChatMessageStoreVo;
import org.iks.push.business.service.PushService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author kzou
 * @date 2024/1/3 15:55
 * @description:
 */
@Tag(name = "推送服务")
@RequestMapping
@RestController
public class PushController {

    @Autowired
    private PushService pushService;

    @Operation(summary = "消息推送")
    @PostMapping("/send/chatMessage")
    public AjaxResult<?> sendChatMessage(@RequestBody ChatMessageStoreVo msg) {
        pushService.sendChatMessage(msg);
        return AjaxResult.success();
    }

}
